package mest.controller.hank;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Classname Plan_Productjob_Util
 * @Description TODO
 * @Date 2019/12/15 17:21
 * @Created by 18416
 * @Auther: henk
 */
@RestController
@RequestMapping("/Plan_Productjob_Util")
@CrossOrigin
public class Plan_Productjob_Util {

    @RequestMapping("/test")
    public String test(@RequestBody JSONArray json){
        System.out.println("test:进入了~");
        List<Integer> li = json.toJavaObject(List.class);
        System.out.println(li.toString());
        return li.toString();
    }
    @RequestMapping("/test1")
    public String test1(@RequestBody JSONObject json){
        System.out.println("test1:进入了~");
        List<Map> li = json.toJavaObject(List.class);
        System.out.println(li.toString());
        return li.toString();
    }

    @RequestMapping("/test2")
    public String test2(@RequestBody JSONObject json){
        System.out.println("test2:进入了~");
        Map<String,Object> li = json.toJavaObject(Map.class);
        System.out.println(li.toString());
        return li.toString();
    }


}
